package org.example.user.mapper;

import org.example.user.entity.SysUserEntity;
import com.mybatisflex.core.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.example.user.vo.UserVO;

/**
 * 用户表 映射层。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUserEntity> {

    //基础查询（自动处理VO中的关系映射）
    default UserVO selectUserVO(Long userId){
        return selectOneWithRelationsByIdAs(userId,UserVO.class);
    }

}
